package com.gmail.blackdog1987.onedollar.entity;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Created by dongguochao on 12/7/15.
 */
@Entity
@Table(name = "t_user_withdraw", schema = "", catalog = "onedollar")
public class TUserWithdrawEntity {
    private int id;
    private Integer userId;
    private Integer chargeId;
    private Integer status;
    private String operator;
    private String memo;
    private String bank;
    private String banknumber;
    private String alipay;
    private String wechat;
    private String username;
    private String cardnumber;
    private String cardtype;
    private String phone;
    private BigDecimal money;

    @Id
    @GeneratedValue
    @Column(name = "id", nullable = false, insertable = false, updatable = true)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_id", nullable = true, insertable = true, updatable = true)
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "charge_id", nullable = true, insertable = true, updatable = true)
    public Integer getChargeId() {
        return chargeId;
    }

    public void setChargeId(Integer chargeId) {
        this.chargeId = chargeId;
    }

    @Basic
    @Column(name = "status", nullable = true, insertable = true, updatable = true)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "operator", nullable = true, insertable = true, updatable = true, length = 50)
    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @Basic
    @Column(name = "memo", nullable = true, insertable = true, updatable = true, length = 50)
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Basic
    @Column(name = "bank", nullable = true, insertable = true, updatable = true, length = 50)
    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    @Basic
    @Column(name = "banknumber", nullable = true, insertable = true, updatable = true, length = 20)
    public String getBanknumber() {
        return banknumber;
    }

    public void setBanknumber(String banknumber) {
        this.banknumber = banknumber;
    }

    @Basic
    @Column(name = "alipay", nullable = true, insertable = true, updatable = true, length = 50)
    public String getAlipay() {
        return alipay;
    }

    public void setAlipay(String alipay) {
        this.alipay = alipay;
    }

    @Basic
    @Column(name = "wechat", nullable = true, insertable = true, updatable = true, length = 50)
    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    @Basic
    @Column(name = "username", nullable = true, insertable = true, updatable = true, length = 10)
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "cardnumber", nullable = true, insertable = true, updatable = true, length = 20)
    public String getCardnumber() {
        return cardnumber;
    }

    public void setCardnumber(String cardnumber) {
        this.cardnumber = cardnumber;
    }

    @Basic
    @Column(name = "cardtype", nullable = true, insertable = true, updatable = true, length = 20)
    public String getCardtype() {
        return cardtype;
    }

    public void setCardtype(String cardtype) {
        this.cardtype = cardtype;
    }

    @Basic
    @Column(name = "phone", nullable = true, insertable = true, updatable = true, length = 20)
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "money", nullable = true, insertable = true, updatable = true, precision = 2)
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TUserWithdrawEntity entity = (TUserWithdrawEntity) o;

        if (id != entity.id) return false;
        if (userId != null ? !userId.equals(entity.userId) : entity.userId != null) return false;
        if (chargeId != null ? !chargeId.equals(entity.chargeId) : entity.chargeId != null) return false;
        if (status != null ? !status.equals(entity.status) : entity.status != null) return false;
        if (operator != null ? !operator.equals(entity.operator) : entity.operator != null) return false;
        if (memo != null ? !memo.equals(entity.memo) : entity.memo != null) return false;
        if (bank != null ? !bank.equals(entity.bank) : entity.bank != null) return false;
        if (banknumber != null ? !banknumber.equals(entity.banknumber) : entity.banknumber != null) return false;
        if (alipay != null ? !alipay.equals(entity.alipay) : entity.alipay != null) return false;
        if (wechat != null ? !wechat.equals(entity.wechat) : entity.wechat != null) return false;
        if (username != null ? !username.equals(entity.username) : entity.username != null) return false;
        if (cardnumber != null ? !cardnumber.equals(entity.cardnumber) : entity.cardnumber != null) return false;
        if (cardtype != null ? !cardtype.equals(entity.cardtype) : entity.cardtype != null) return false;
        if (phone != null ? !phone.equals(entity.phone) : entity.phone != null) return false;
        if (money != null ? !money.equals(entity.money) : entity.money != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (chargeId != null ? chargeId.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (operator != null ? operator.hashCode() : 0);
        result = 31 * result + (memo != null ? memo.hashCode() : 0);
        result = 31 * result + (bank != null ? bank.hashCode() : 0);
        result = 31 * result + (banknumber != null ? banknumber.hashCode() : 0);
        result = 31 * result + (alipay != null ? alipay.hashCode() : 0);
        result = 31 * result + (wechat != null ? wechat.hashCode() : 0);
        result = 31 * result + (username != null ? username.hashCode() : 0);
        result = 31 * result + (cardnumber != null ? cardnumber.hashCode() : 0);
        result = 31 * result + (cardtype != null ? cardtype.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        return result;
    }
}
